]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
telepathyClient: Add history navigation to entry
authorJasper St. Pierre <jstpierre@mecheye.net>
Sun, 20 Feb 2011 08:41:51 +0000 (03:41 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 14 Mar 2011 22:42:55 +0000 (18:42 -0400)
This adds a non-saving history to each notification entry,
like runDialog and lookingGlass.

https://bugzilla.gnome.org/show_bug.cgi?id=642793

js/ui/telepathyClient.js

index ab90579a35daade48c6d26bd20d9fedbd357e318..4056679d901ef6c9ec0d83ee2883139bdc49e210 100644 (file)
@@ -11,6 +11,7 @@ const Tp = imports.gi.TelepathyGLib;
 const Gettext = imports.gettext.domain('gnome-shell');
 const _ = Gettext.gettext;
 
+const History = imports.misc.history;
 const Main = imports.ui.main;
 const MessageTray = imports.ui.messageTray;
 
@@ -291,6 +292,8 @@ Notification.prototype = {
             this._oldMaxScrollAdjustment = adjustment.upper;
         }));
 
+        this._inputHistory = new History.HistoryManager({ entry: this._responseEntry.clutter_text });
+
         this._history = [];
         this._timestampTimeoutId = 0;
     },
@@ -392,6 +395,8 @@ Notification.prototype = {
         if (text == '')
             return;
 
+        this._inputHistory.addItem(text);
+
         // Telepathy sends out the Sent signal for us.
         // see Source._messageSent
         this._responseEntry.set_text('');